import fetch from 'node-fetch'

export const requestText = (url, conf = {}) => {
    return fetch(url, conf).then(res => res.text())
}

export const requestJson = (url, conf = {}) => {
    return fetch(url, conf).then(res => res.json())
}

export default fetch